package com.harry12.mybatis.controller;

import com.harry12.mybatis.Mapper.PaymentMapper;
import com.harry12.mybatis.entity.Payment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PaymentController {
    @Autowired
    PaymentMapper paymentMapper;
    @GetMapping("/payment/{id}")
    public Payment getPayment(@PathVariable("id")Integer id){
        return paymentMapper.getPaymentById(id);
    }
}
